﻿@model Mix.Cms.Lib.ViewModels.MixModules.ReadMvcViewModel
@{
    string master = MixService.GetConfig<string>(MixAppSettingKeywords.ThemeFolder, ViewBag.culture);
    Layout = null;
}
@if (!string.IsNullOrEmpty(Model.TemplatePath))
{
    try
    {
        <partial name="@Model.TemplatePath" model="@Model" />
    }
    catch (System.InvalidOperationException invalidOperationException)
    {
        <p class="danger text-center has-error">Unable load template with Exception detail below:</p>
        <code>
            @invalidOperationException
        </code>

    }
    catch (Exception ex)
    {
        <code>
            @ex
        </code>
        <p class="danger text-center has-error">Unable load template</p>
    }
}
else
{
    <section class="container">
        <h1>@(MixService.Translate<string>("Please choose template", ViewBag.culture))</h1>
    </section>
}

@Html.Raw(Model.View?.Styles)
@Html.Raw(Model.View?.Scripts)